Back to Entering Method Code
Entering Callback Function Code
The Pixels Callback function transfers the data from the Pixels Data Store to the GUI's Pixmap for display.
Since the Circuitry is a standalone library that knows nothing about the GUI, we pre-declare an external function and pass in a void* for the Dialog (the one registered with CLIP by the ::CLIP::SetCallbackWindow() in the Dialog InitInstance() function. The external function is defined in the GUI files and linked in at link time.
Double Click the Method (or select Edit Code->Execute... in the Right Click menu)
MyCircuit_DrawCbfElemHarn.cpp
// external function
void UpdateDisplay( void* Dlg, char* Pixmap, unsigned int FrameCount );
Uns MyCircuit_DrawCbfElemHarn::Execute()
{
...
// TODO: Add custom execute code
// extract data from store
Pixels& pixels = this->Trigger_PixelsTst1Rec().Data();
// call global Dlg function
UpdateDisplay( pWnd, pixels.Values(), pixels.FrameCount() );
return TRUE;
}